<template>
    <div class="food-details-view">
        <dishes-of-detail :detailsofdishes="detailsofdishes"></dishes-of-detail>
    </div>
</template>

<script>
import DishesOfDetail from "../components/DishesOfDetail.vue";
export default {
    components: { DishesOfDetail },
    props: {
        foodid: {
            type: String,
            default: "",
        },
    },
    data() {
        return {
            detailsofdishes: [],
        };
    },
    created() {
        this.getDetailsOfDishes();
    },
    methods: {
        async getDetailsOfDishes() {
            await this.axios.get(`/recipe/detail/${this.foodid}`).then((re) => {
                console.log(re);
                this.detailsofdishes = re.result.recipe;
            });
        },
        // jumpTo() {
        //     this.$router.replace("/");
        // },
    },
};
</script>

<style></style>
